#include <iostream>

using namespace std;

template<typename Ty, size_t... P>
struct B;
template<typename Ty>
class A 
{
	template<typename Ty, size_t... P>
	friend struct B;
	int i = 10; 
};

template<typename Ty, size_t... P>
struct B
{
	void printA(const A<Ty>& a) { cout << a.i << endl; }
};

int main()
{
	A<int> a;
	B<int> b;
	b.printA(a);

	return 0;
}